package com.ae.shield.common.enchantment.shieldSuffix;

import net.minecraft.enchantment.Enchantment;

import javax.annotation.Nonnull;

public class SuperCharged extends SuffixBase {
    public SuperCharged() {
        super(new SuffixRate()
                .intensity(15f, 0)
                .cd(0.15f,1)
                .cost(1.1f, 2));
    }

    @Override
    public float levelRate(int level, SuffixProperty property, float rate) {
        switch (property) {
            case INTENSITY:
            case CD:
            case COST:
                return rate * level;
            default:
                return rate;
        }
    }

    @Override
    protected boolean canApplyTogether(@Nonnull Enchantment enchantment) {
        return enchantment != SuffixList.TRICKLE_CHARGE.get() && super.canApplyTogether(enchantment);
    }
}
